<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>重复渐变</title>
    <style>
      .box {
        width: 300px;
        height: 200px;
        border: 1px solid black;
        float: left;
        margin-left: 50px;
        font-size: 20px;
      }
      /* 重复线性渐变  重复渐变:将不渐变的地方变为渐变 */
      .box1 {
        background-image: repeating-linear-gradient(red 50px,yellow 100px,green 150px);
      }
      /* 重复径向渐变*/
      .box2{
        /* 改变渐变的位置 */
        background-image: repeating-radial-gradient(red 50px,yellow 100px, green 150px);
      }
    </style>
</head>
<body>
    <div class="box box1"></div>
    <div class="box box2"></div>
</body>
</html>